export default{ 
    namespaced:true,
    state:{
        isShowToast:false,
        toastMsg:"手机号",
       toastType:"类型"
    },
    mutations:{
        changeIsShowToast(state,payload){
            state.isShowToast=payload.isshow
            if(payload.isshow){
                state.toastMsg=payload.msg
                state.toastType=payload.type
            }
           
        }
    },
    // 放异步代码
    actions: {
        asyncChangeIsShowToast(context,payload){
            context.commit("changeIsShowToast",payload)
            setTimeout(()=>{
                context.commit("changeIsShowToast",{
                    isshow:false
                })

            },1000)
        }
    }
}